<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
  <link th:href="@{/css/style.css}" rel="stylesheet" type="text/css"/>
  <script type="text/javascript" th:src="@{/js/jquery.js}"></script>
</head>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>数据统计</li>
    <li><a href="/erp1/statis/custom/allcustomstatis">客户销量统计</a></li>
    <li>销量详情</li>
  </ul>
</div>
<div class="rightinfo">
  <form action="/erp1/statis/custom/customview" method="post" id="allcustombyidform">
    <input type="hidden" name="pageno" id="pageno"/>
    <input type="hidden" name="id" th:value="${id}">
    <table class="tablelist">
      <thead>
        <tr>
          <th>序号</th>
          <th>客户姓名</th>
          <th>订购单编号</th>
          <th>商品数量</th>
          <th>金额</th>
          <th>订购时间</th>
          <th>操作人</th>
          <th>订购单详情</th>
        </tr>
      </thead>
      <tbody>
        <tr th:each="c,var : ${allcustombyid.list}">
          <td th:text="${var.count+(allcustombyid.pageNum-1)*allcustombyid.pageSize}">1</td>
          <td th:text="${c.customname}">王金平</td>
          <td th:text="${c.orderid}">DJ201701270001</td>
          <td th:text="${c.amount}">5</td>
          <td th:text="${'￥'+c.total}">￥76,582</td>
          <td th:text="${#dates.format(c.ordertime,'yyyy-MM-dd HH:mm:ss')}">2017-01-25 15:05:05</td>
          <td th:text="${c.users.uname}">马云</td>
          <td>
            <a th:href="@{'/market/orders/ordersDetails?orderid='+${c.orderid}}" class="tablelink">查看详情</a>
          </td>
        </tr>
      </tbody>
    </table>
    <div class="pagin">
      <div class="message">共<i class="blue" th:text="${allcustombyid.total}"></i>条记录，当前显示第&nbsp;<i class="blue" th:text="${allcustombyid.pageNum+'&nbsp;'}">2</i>页
      </div>
      <ul class="paginList">
        <li class="paginItem">
          <a href="javascript:void(0);"
             th:onclick="goPage([[${allcustombyid.isFirstPage?1:allcustombyid.pageNum-1}]])">
            <span th:class="${allcustombyid.isFirstPage?'pagepre':'pagenxt roate'}"></span>
          </a>
        </li>
        <li th:class="${page==allcustombyid.pageNum?'paginItem current':'paginItem'}"
            th:each="page : ${allcustombyid.navigatepageNums}">
          <a href="javascript:;" th:text="${page}" th:onclick="goPage([[${page}]])">1</a>
        </li>
        <li class="paginItem">
          <a href="javascript:void(0);"
             th:onclick="goPage([[${allcustombyid.isLastPage?allcustombyid.pages:allcustombyid.pageNum+1}]])">
            <span th:class="${allcustombyid.isLastPage?'pagepre roate':'pagenxt'}"></span>
          </a>
        </li>
      </ul>
    </div>
  </form>
</div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');

	function goPage(num) {
        $("#pageno").val(num);
        $("#allcustombyidform").submit();
    }
</script>
</body>
</html>
